package newHomework;

import java.util.Scanner;

public class Next06 {
    public static void main(String[] args) {
        System.out.println("请输入选好的手机号");
        Scanner scanner=new Scanner(System.in);
        String phone=scanner.nextLine();
        getPrice(phone);

    }
    public static void getPrice(String str){
        int num=str.charAt(10);

        if (str.length()!=11){
            System.out.println("输入错误");
            return;
        }

        if (num==8){
            System.out.println("消费50");
        }else if (num==4){
            System.out.println("免费");
        }else {
            System.out.println("消费20");
        }
    }

}
